info = {"name": "tom", "age": 18, "gender": "男"}
# 查询年龄
print(info['age'])
print(info.get('age'))

# 查询工资
# print(info['salary'])    # 键不存在 报错
print(info.get('salary'))  # 键不存在 返回None

